package com.yvpi.yvpicturebackend.service;

import cn.hutool.core.util.ObjUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yvpi.yvpicturebackend.exception.BusinessException;
import com.yvpi.yvpicturebackend.exception.ErrorCode;
import com.yvpi.yvpicturebackend.exception.ThrowUtils;
import com.yvpi.yvpicturebackend.model.dto.space.SpaceAddRequest;
import com.yvpi.yvpicturebackend.model.dto.space.SpaceQueryRequest;
import com.yvpi.yvpicturebackend.model.dto.space.analyze.*;
import com.yvpi.yvpicturebackend.model.entity.Picture;
import com.yvpi.yvpicturebackend.model.entity.Space;
import com.yvpi.yvpicturebackend.model.entity.User;
import com.yvpi.yvpicturebackend.model.vo.space.SpaceVO;
import com.yvpi.yvpicturebackend.model.vo.space.analyze.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
* @author aaa
* @description 针对表【space(空间)】的分析操作Service
* @createDate 2025-04-12 17:31:22
*/
public interface SpaceAnalyzeService extends IService<Space> {
    /**
     * 获取空间使用分析数据
     * @param spaceUsageAnalyzeRequest
     * @param loginUSer
     * @return
     */
    SpaceUsageAnalyzeResponse getSpaceUsageAnalyze(
            SpaceUsageAnalyzeRequest spaceUsageAnalyzeRequest,User loginUSer);

    /**
     * 获取空间图片分类信息
     * @param spaceCategoryAnalyzeRequest
     * @param loginUser
     * @return
     */
    List<SpaceCategoryAnalyzeResponse> getSpaceCategoryAnalyze(
            SpaceCategoryAnalyzeRequest spaceCategoryAnalyzeRequest,User loginUser);
    /**
     * 获取空间图片标签信息
     * @param spaceTagAnalyzeRequest
     * @param loginUser
     * @return
     */
    List<SpaceTagAnalyzeResponse> getSpaceTagAnalyze(
            SpaceTagAnalyzeRequest spaceTagAnalyzeRequest, User loginUser);

    /**
     * 获取空间图片大小分析
     * @param spaceSizeAnalyzeRequest
     * @param loginUser
     * @return
     */
    List<SpaceSizeAnalyzeResponse> getSpaceSizeAnalyze(
            SpaceSizeAnalyzeRequest spaceSizeAnalyzeRequest,User loginUser);

    /**
     * 获取空间用户上传行为分析
     * @param spaceUserAnalyzeRequest
     * @param loginUser
     * @return
     */
     List<SpaceUserAnalyzeResponse> getSpaceUserAnalyze(
             SpaceUserAnalyzeRequest spaceUserAnalyzeRequest, User loginUser) ;
    /**
     * 空间使用排行分析
     * @param spaceRankAnalyzeRequest
     * @param loginUser
     * @return
     */
     List<Space> getSpaceRankAnalyze(SpaceRankAnalyzeRequest spaceRankAnalyzeRequest,
                                     User loginUser);
}
